define(function(require, exports, module) {
    var modes = {};
    var supportedModes = {
        abap: ["abap"],
        actionscript: ["as"],
        ada: ["ada","adb"],
        apache_conf: ["htaccess","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd"],
        asciidoc: ["asciidoc"],
        assembly_x86: ["asm"],
        autohotkey: ["ahk"],
        batchfile: ["bat","cmd"],
        c9search: ["c9search_results"],
        c_cpp: ["cpp","c","cc","cxx","h","hh","hpp"],
        clojure: ["clj"],
        cobol: ["cbl","cob"],
        coffee: ["coffee","cf","cson","cakefile"],
        coldfusion: ["cfm"],
        csharp: ["cs"],
        css: ["css"],
        curly: ["curly"],
        d: ["d","di"],
        dart: ["dart"],
        diff: ["diff","patch"],
        dot: ["dot"],
        erlang: ["erl","hrl"],
        ejs: ["ejs"],
        forth: ["frt","fs","ldr"],
        ftl: ["ftl"],
        glsl: ["glsl","frag","vert"],
        golang: ["go"],
        groovy: ["groovy"],
        haml: ["haml"],
        handlebars: ["hbs","handlebars","tpl","mustache"],
        haskell: ["hs"],
        haxe: ["hx"],
        html: ["html","htm","xhtml","cshtml"],
        html_ruby: ["erb","rhtml"],
        ini: ["ini","conf","cfg","prefs"],
        jack: ["jack"],
        jade: ["jade"],
        java: ["java"],
        javascript: ["js","jsm"],
        json: ["json","oexe"],
        jsoniq: ["jq"],
        jsp: ["jsp"],
        jsx: ["jsx"],
        julia: ["jl"],
        latex: ["tex","latex","ltx","bib"],
        less: ["less"],
        liquid: ["liquid"],
        lisp: ["lisp"],
        livescript: ["ls"],
        logiql: ["logic","lql"],
        lsl: ["lsl"],
        lua: ["lua"],
        luapage: ["lp"],
        lucene: ["lucene"],
        makefile: ["makefile","gnumakefile","makefile","ocamlmakefile","make"],
        matlab: ["matlab"],
        markdown: ["md","markdown"],
        mel: ["mel"],
        mysql: ["mysql"],
        mushcode: ["mc","mush"],
        nix: ["nix"],
        objectivec: ["m","mm"],
        ocaml: ["ml","mli"],
        pascal: ["pas","p"],
        perl: ["pl","pm"],
        pgsql: ["pgsql"],
        php: ["php","phtml"],
        powershell: ["ps1"],
        prolog: ["plg","prolog"],
        properties: ["properties"],
        protobuf: ["proto"],
        python: ["py"],
        r: ["r"],
        rdoc: ["rd"],
        rhtml: ["rhtml"],
        ruby: ["rb","ru","gemspec","rake","guardfile","rakefile","gemfile"],
        rust: ["rs"],
        sass: ["sass"],
        scad: ["scad"],
        scala: ["scala"],
        scheme: ["scm","rkt"],
        scss: ["scss"],
        sh: ["sh","bash",".bashrc"],
        sjs: ["sjs"],
        space: ["space"],
        snippets: ["snippets"],
        soy_template: ["soy"],
        sql: ["sql"],
        stylus: ["styl","stylus"],
        svg: ["svg"],
        tcl: ["tcl"],
        tex: ["tex"],
        text: ["txt",'ini','log'],
        textile: ["textile"],
        toml: ["toml"],
        twig: ["twig"],
        typescript: ["ts","typescript","str"],
        vbscript: ["vbs"],
        velocity: ["vm"],
        verilog: ["v","vh","sv","svh"],
        xml: ["xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl"],
        xquery: ["xq"],
        yaml: ["yaml","yml"]
    };
    function initMode() {
        for (var lng in supportedModes) {
            for (var i = 0; i < supportedModes[lng].length; i++) {
                modes[supportedModes[lng][i]] = lng;
            }
        }
    }
    function get(ext){// get the mode by file extences;
        return modes[ext];
    }
    initMode();
    return{
        get:get,
        modes:modes
    }
});
